<!DOCTYPE html>
<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Built-in sorting</title>
</head>
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
<body>
<div id="gantt_here" style='width:1000px; height:420px;'></div>

<script type="text/javascript">
    var tasks = {
        data:[
            {id:1, text:"Project #1", start_date:"01-04-2013", duration:8, order:5, progress: 0.6, open: true},
            {id:2, text:"Task #1", start_date:"03-04-2013", duration:5, order:3, parent:1, progress: 1, open: true},
            {id:3, text:"Task #2", start_date:"02-04-2013", duration:7, order:3, parent:1, progress: 0.5, open: true},
            {id:4, text:"Task #2.1", start_date:"03-04-2013", duration:2, order:3, parent:3, progress: 1, open: true},
            {id:5, text:"Task #2.2", start_date:"04-04-2013", duration:3, order:3, parent:3, progress: 0.8, open: true},
            {id:6, text:"Task #2.3", start_date:"05-04-2013", duration:4, order:3, parent:3, progress: 0.2, open: true}
        ],
        links:[
            {id:1,source:1,target:2,type:"1"},
            {id:2,source:1,target:3,type:"1"},
            {id:3,source:3,target:4,type:"1"},
            {id:4,source:4,target:5,type:"0"},
            {id:5,source:5,target:6,type:"0"}
        ]
    };
    gantt.config.sort = true;

    gantt.init("gantt_here");
    gantt.parse(tasks);
</script>
</body>